﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace DoxygenBrowser.Common.Model
{
    public class FileLocation
    {
        string _path;
        string _anchor;

        public FileLocation()
        {
            Path = string.Empty;

            Anchor = string.Empty;
        }

        public FileLocation(string strPath, string strAnchor)
        {
            Path = strPath;
            Anchor = strAnchor;
        }

        public string Path
        {
            get { return _path; }
            set { _path = value; }
        }

        public string Anchor
        {
            get { return _anchor; }
            set { _anchor = value; }
        }

        public bool HasAnchor
        {
            get
            {
                return !string.IsNullOrEmpty(Anchor);
            }
        }

        public string FullPath
        {
            get
            {
                string path = Path;
                if (HasAnchor)
                {
                    path += "#";
                    path += Anchor;
                }
                return path;

            }
        }
    }
}